using System.Collections;
using NodeCanvas.Variables;

namespace NodeCanvas.Actions
{
	public class ITweenLook : ITweenActions
	{
		public enum LookType
		{
			LookTo = 0,
			LookFrom = 1
		}

		public LookType lookType;

		public BBVector targetPosition;

		private Hashtable hash;

		protected override string info
		{
			get
			{
				return "ITween " + lookType;
			}
		}

		protected override void OnExecute()
		{
			hash = iTween.Hash("looktarget", targetPosition.value, "name", id.value, "delay", delay.value, "time", time.value, "easetype", easeType);
			if (lookType == LookType.LookTo)
			{
				iTween.LookTo(base.agent.gameObject, hash);
			}
			else
			{
				iTween.LookFrom(base.agent.gameObject, hash);
			}
			base.OnExecute();
		}
	}
}
